package com.sunlands.qdcy.tongzhuo.repository;

import com.sunlands.qdcy.tongzhuo.model.UserDiaryForwardDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author mengxc
 * @date 2019/5/3016:43
 */
@Repository
public interface UserDiaryForwardRepository extends JpaRepository<UserDiaryForwardDO, Long>,JpaSpecificationExecutor<UserDiaryForwardDO> {

    List<UserDiaryForwardDO> findByTypeAndTargetId(Integer type, Long targetId);

    Long countByTypeAndTargetId(Integer type, Long targetId);

}
